fix(PropertyFileConfiguration): Circular reference in Application::lo…#5323
Merged
fix(PropertyFileConfiguration): Circular reference in Application::lo…#5323
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Fixes a circular reference caused by PropertyFileConfiguration retaining an owning reference to its parent configuration during Application::loadConfiguration().
Changes:
- Replaces
PropertyFileConfiguration’s stored parent fromAbstractConfiguration::Ptr(owning) to a raw pointer (non-owning). - Updates
Applicationto constructPropertyFileConfigurationwith_pConfigdirectly rather than creating an aliasingPtr.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| Util/src/PropertyFileConfiguration.cpp | Stops taking ownership of the parent configuration by storing only a raw pointer. |
| Util/src/Application.cpp | Adjusts call sites to pass _pConfig directly when creating PropertyFileConfiguration. |
| Util/include/Poco/Util/PropertyFileConfiguration.h | Changes _pParentConfig member to a non-owning pointer and documents the lifetime assumption. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…adConfiguration() #5322
…ads, regression test Mark the three raw-pointer constructors explicit to prevent accidental implicit conversions, and reintroduce the AbstractConfiguration::Ptr overloads as POCO_DEPRECATED forwarders so callers written against 1.15.1/1.15.2 get a compile-time warning. Add a regression test that verifies the parent's reference count is not bumped by child construction or destruction, and an entry in CHANGELOG under a new Release 1.15.3 (Unreleased) section.
9393c4b to
fabe761
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…adConfiguration() #5322